﻿@using HouseHoldBudget.App_GlobalResources
@using Kendo.Mvc.UI
@model IList<HouseHoldBudget.Models.Expenses.ExpenseModel>

<table class="content">
    <tr>
        <td>
            @(Html.Kendo().Grid(Model)
               .Name("expenses-grid")
               .Columns(columns =>
                            {
                                columns.Bound(x => x.ExpenseOn).Title(@CustomResources.Common_Date);
                                columns.Bound(x => x.ExpenseAmount).Title(@CustomResources.Common_Amount);
                                columns.Bound(x => x.ExpenseLabel).Title(@CustomResources.Common_Label);
                                columns.Bound(x => x.ExpenseType.ExpenseTypeName).Title(@CustomResources.ManageMyBudgets_Type).ClientTemplate("#=ExpenseType.ExpenseTypeName#");
                            })
                                .DataSource(dataSource => dataSource
                                                .Ajax() 
                                                .Read(read => read.Action("GetLastExpensesSummary", "Dashboards"))))
                    
                </td>
    </tr>
</table>
